﻿using ExcelHelperTest.EPPlus;
using ExcelHelperTest.NPOI;
using Hukee.ExcelHelper.NPOIExtensions;
using System;

namespace ExcelHelperTest;

class Program
{
    static void Main(string[] args)
    {
        DoExcelExportTest(); // 导出测试

        // DoExcelReadImportTest(); // 导入读取测试

        Console.WriteLine("Main End!");
        Console.ReadLine();
    }

    /// <summary>
    /// 导出测试
    /// </summary>
    public static void DoExcelExportTest()
    {
        Console.WriteLine("ExcelFileCreate Test Start!");
        Console.WriteLine("******* To Test NPOI Do ExportFile *******");
        NPOIExcelHelperTest.DoExcelTestMulSheet("C:\\Users\\hukee\\Desktop\\新建文件夹\\ExcelTestNPOI.xlsx");

        Console.WriteLine("******* To Test EPPlus Do ExportFile *******");
        EPPlusExcelHelperTest.DoExcelTestMulSheet("C:\\Users\\hukee\\Desktop\\新建文件夹\\ExcelTestEP.xlsx");
        Console.WriteLine("ExcelFileCreate Test End!");
    }

    /// <summary>
    /// 导入读取测试
    /// </summary>
    public static void DoExcelReadImportTest()
    {
        Console.WriteLine("ExcelFileReadToList Test Start!");
        Console.WriteLine("******* To Test NPOI Do ImportRead *******");
        NPOIExcelHelperTest.DoExcelReadIntoDtoList("C:\\Users\\hukee\\Desktop\\新建文件夹\\ExcelTestNPOI.xlsx", ExcelVersion.xlsx);

        Console.WriteLine("******* To Test EPPlus Do ImportRead *******");
        EPPlusExcelHelperTest.DoExcelReadIntoDtoList("C:\\Users\\hukee\\Desktop\\新建文件夹\\ExcelTestEP.xlsx");
        Console.WriteLine("ExcelFileReadToList Test End!");
    }

}
